package com.ltkj.baseplatform.feign;

import com.ltkj.baseplatform.domain.bo.LoginBodyBo;
import com.ltkj.common.core.constant.SecurityConstants;
import com.ltkj.common.core.constant.ServiceNameConstants;
import com.ltkj.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteAuthService", value = ServiceNameConstants.AUTH_SERVICE)
public interface RemoteAuthService {
    @PostMapping("loginForWx")
    public R<?> loginForWx(@RequestBody LoginBodyBo loginBodyBo);

    @PostMapping("login")
    public R<?> login(@RequestBody LoginBodyBo loginBodyBo);

    @DeleteMapping("logout")
    R<?> logout(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
